<?php

/*
This file is part of Bugzilla Printable Report 

    Bugzilla Printable Report  is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Bugzilla Printable Report  is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Bugzilla Printable Report .  If not, see <http://www.gnu.org/licenses/>.
*/

//Bug Reports Functions File

//builds bugzilla links.
      function bugLink($id, $title) {
	  global $bugzilla_url;
       return '<a href="' . $bugzilla_url . 'show_bug.cgi?id=' . $id . '" NAME="' . $id . '">' . $title . '</a>';
      }
	
//replace strange characters 
function bugsText($text) {
	
	$order   = array("\r\n", "\n", "\r");
	
	//replace returns for <br>'s
		 $newText = str_replace($order, '<br>', $text);

                 //I was getting strange charaters in my bug description
                 //I assumn this won't be a problem for most.
		 // replace bugzilla   for "
		// $newText = str_replace(array('“','”'), '"', $newText);
		 // replace bugzill  with -
		// $newText = str_replace(array('—'), '-', $newText);
		
		return $newText;
}
?>